home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb-4.5 / dist / bfd / libcoff-in.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-24  |  2.5 KB  |  78 lines

  1. /* BFD COFF object file private structure.
  2.    Copyright (C) 1990-1991 Free Software Foundation, Inc.
  3.    Written by Cygnus Support.
  4.  
  5. This file is part of BFD, the Binary File Descriptor library.
  6.  
  7. This program is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2 of the License, or
  10. (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21.  
  22. /* Object file tdata; access macros */
  23.  
  24. #define coff_data(bfd)        ((bfd)->tdata.coff_obj_data)
  25. #define exec_hdr(bfd)        (coff_data(bfd)->hdr)
  26. #define obj_symbols(bfd)    (coff_data(bfd)->symbols)
  27. #define    obj_sym_filepos(bfd)    (coff_data(bfd)->sym_filepos)
  28.  
  29. #define obj_relocbase(bfd)    (coff_data(bfd)->relocbase)
  30. #define obj_raw_syments(bfd)    (coff_data(bfd)->raw_syments)
  31. #define obj_convert(bfd)    (coff_data(bfd)->conversion_table)
  32. #if CFILE_STUFF
  33. #define obj_symbol_slew(bfd)    (coff_data(bfd)->symbol_index_slew)
  34. #else
  35. #define obj_symbol_slew(bfd) 0
  36. #endif
  37.  
  38.  
  39. /* `Tdata' information kept for COFF files.  */
  40.  
  41. typedef struct coff_tdata
  42. {
  43.   struct   coff_symbol_struct *symbols;    /* symtab for input bfd */
  44.   unsigned int *conversion_table;
  45.   file_ptr sym_filepos;
  46.  
  47.   long symbol_index_slew;    /* used during read to mark whether a
  48.                    C_FILE symbol as been added. */
  49.  
  50.   struct coff_ptr_struct *raw_syments;
  51.   struct lineno *raw_linenos;
  52.   unsigned int raw_syment_count;
  53.   unsigned short flags;
  54.  
  55.   /* These are only valid once writing has begun */
  56.   long int relocbase;
  57.  
  58.   /* These members communicate important constants about the symbol table
  59.      to GDB's symbol-reading code.  These `constants' unfortunately vary
  60.      from coff implementation to implementation...  */
  61.   unsigned local_n_btmask;
  62.   unsigned local_n_btshft;
  63.   unsigned local_n_tmask;
  64.   unsigned local_n_tshift;
  65.   unsigned local_symesz;
  66.   unsigned local_auxesz;
  67.   unsigned local_linesz;
  68. } coff_data_type;
  69.  
  70. /* We take the address of the first element of a asymbol to ensure that the
  71.  * macro is only ever applied to an asymbol.  */
  72. #define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
  73.  
  74.  
  75.  
  76. /* And more taken from the source .. */
  77.  
  78.